home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 October
/
EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso
/
Aminet
/
comm
/
fido
/
XPACK275.lha
/
rexx
/
Xkill.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-05-10
|
1KB
|
41 lines
/**/
v="$VER: Xkill Rexx Remove files from site queues Williamson 56.00"
parse upper arg site_pattern file_pattern .
if arg()=0 then do
Say "Xkill v"right(v,5)" site_pattern file_pattern"
Say " eg: #?151#? #?(LHA|TIC)"
exit
end
sitelist=XfqGetSiteList()
call XfqWalkSession(sitelist,sites)
Say "There are "sites.NUMENTRIES" sites in the queue"
do loop=1 to sites.NUMENTRIES
addrtags.XQ_Mandatory=511;addrtags.XQ_Optional=511
System=XfqPutAddress(sites.loop,addrtags)
if ~MatchPattern(site_pattern,upper(System),'N') then iterate
call XfqWalkQueue(sites.loop,sitework)
Say "There are "sitework.NUMENTRIES" files for "System
do i=1 to sitework.NUMENTRIES
Say "Found "sitework.i.NAME" as "sitework.i.ASNAME" at priority "sitework.i.PRI
if ~EXISTS(sitework.i.NAME) then do
Say "File "sitework.i.NAME" does not exist"
call remove()
end
else if MatchPattern(file_pattern,sitework.i.NAME) then call remove()
end
end
call XfqDropObject(sitelist)
call XfqClose()
exit
remove:
options prompt "Remove "sitework.i.NAME"? y/N"
parse pull resp
if upper(resp)="Y" then do
FINDIT.XQ_NAME=sitework.i.NAME;FINDIT.XQ_SITE=sites.loop
work=NULL;work=XfqFindWork(FINDIT)
if(work=NULL) then Say "Already removed by another process"
else call XfqRemoveWork(work)
end
return